package com.myjavalab.dotsandboxes;

public class Box {

	private int row;
	private int column;
	private String name;
	private int edgeNum;
	private char content;
	
	public Box(int row, int column, String name){
		this.row = row;
		this.column = column;
		this.name = name;
	}

	public int getEdgeNum() {
		return edgeNum;
	}

	public void setEdgeNum(int edgeNum) {
		this.edgeNum = edgeNum;
	}

	public int getRow() {
		return row;
	}

	public int getColumn() {
		return column;
	}
	
	public int hashCode(){
		return row + column + edgeNum;
	}
	
	public boolean equals(Object o){
		if (this == o) {
		    return true;
		}
		if(o instanceof Box){
			Box b = (Box)o;
			if(b.row == this.row && b.column == this.column){
				return true;
			}
		}
		return false;
	}
	
	public String toString(){
		return name;
	}

	public char getContent() {
		return content;
	}

	public void setContent(char content) {
		this.content = content;
	}

	public String getName() {
		return name;
	}
	
	
}
